// 对象结构转字节数组互转
#ifndef __XJ_OBJECT_CO_BYTES_H__
#define __XJ_OBJECT_CO_BYTES_H__

#include "object_descriptor.h"

#ifdef __cplusplus
extern "C" {
#endif

// 对象结构转字节串
int object_co_bytes (const char *name, void *obj, void *obj_desc_ptr, int32_t obj_field_count, uint8_t *bytes_buf, uint64_t buf_size, int depth);
// 字节转对象结构
int bytes_co_object (const char *name, uint8_t *bytes_buf, uint64_t buf_size, void *obj, void *obj_desc_ptr, int32_t obj_field_count,  int depth);
// 获取字节数组长度
int get_bytes_size(const char *name, void *obj, void *obj_desc_ptr, int32_t obj_field_count);



#ifdef __cplusplus
}
#endif

#endif // __XJ_OBJECT_CO_BYTES_H__